<?php 
	require_once ("dbconnection.php");
	$conn = new DBConnect();
	
	$id = $_GET['id'];
	$stitle = mysql_query("SELECT NEWS_TITLE FROM NEWS WHERE NEWS.ID=$id", $conn->connect()) 
	            or die ("Problem reading table: ".mysql_error());
	$title =  mysql_result($stitle, 0);	
	$simage = mysql_query("SELECT IMAGE_PATH FROM IMAGES WHERE IMAGES.NEWS_ID_FK=$id", $conn->connect())
				or die ("Problem reading table: ".mysql_error());
	$image = mysql_result($simage, 0);
	$sbody = mysql_query("SELECT NEWS_BODY FROM NEWS WHERE NEWS.ID=$id", $conn->connect())
				or die ("Problem reading table: ".mysql_error());
	$body = mysql_result($sbody, 0);
	$scaption = mysql_query("SELECT IMAGE_TITLE FROM IMAGES WHERE IMAGES.NEWS_ID_FK=$id", $conn->connect())
			    or die ("Problem reading table: ".mysql_error());
	$caption = mysql_result($scaption, 0);
	
	echo "<div class='article'>";
    echo "<h1 class='bigarttitle'>".$title."</h1>";
    echo "<a href='".$image."' target='_blank'><img src='".$image."' class='bigartimage' title='".$caption."'/></a>";
    echo "<p class='bitartbody'>".$body."</p></div>";			
?>
    		</div>
    		<a href='index.php'><button id='back'>Back</button></a>
    	</div>
